package api.model;

import m.common.model.FieldMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;

@TableMeta(name="ot_api_migration",description="数据迁移")
public class ApiMigration extends Model {
    @FieldMeta(name="param",type= FieldType.STRING,length=100,description="迁移参数")
    private String param;
    @FieldMeta(name="description",type= FieldType.STRING,notnull = true,length=200,description="描述")
    private String description;
    @FieldMeta(name="server_url",type= FieldType.STRING,length=100,description="服务地址")
    private String serverUrl;
    @FieldMeta(name="verify_oid",type=FieldType.STRING,length=10,defaultValue = "N",description="校验主键",dictOption = "Y:是,N:否")
    private String verifyOid;
    public final static String Verify_Oid_Yes="Y";
    public final static String Verify_Oid_No="N";
    @FieldMeta(name="auth_id",type= FieldType.STRING,length=20,description="鉴权id")
    private String authId;
    @FieldMeta(name="auth_key",type= FieldType.STRING,length=100,description="鉴权key")
    private String authKey;
    @FieldMeta(name="thread_num",type= FieldType.INT,description="进程数量")
    private Integer threadNum;
    @FieldMeta(name="record_num",type= FieldType.LONG,description="记录数量")
    private Long recordNum;
    @FieldMeta(name="send_num",type= FieldType.LONG,description="发送中数量")
    private Long sendNum;
    @FieldMeta(name="success_num",type= FieldType.LONG,description="成功数量")
    private Long successNum;
    @FieldMeta(name="error_num",type= FieldType.LONG,description="失败数量")
    private Long errorNum;
    @FieldMeta(name="surplus_num",type= FieldType.LONG,description="剩余数量")
    private Long surplusNum;
    @FieldMeta(name="exe_progress",type= FieldType.DOUBLE,description="执行进度")
    private Double exeProgress;
    @FieldMeta(name="status",type=FieldType.STRING,length=10,notnull = true,description="状态",dictOption = "N:暂存,E:校验失败,A:校验中,B:校验通过,C:迁移中,D:暂停迁移,Y:完成")
    private String status;
    public final static String Status_Edit="N";
    public final static String Status_Error="E";
    public final static String Status_Check="A";
    public final static String Status_Check_Done="B";
    public final static String Status_Migration="C";
    public final static String Status_Migration_Stop="D";
    public final static String Status_Done="Y";
    @FieldMeta(name="error_message",type= FieldType.STRING,length=1000,description="错误消息")
    private String errorMessage;

    public String getVerifyOid() {
        return verifyOid;
    }

    public void setVerifyOid(String verifyOid) {
        this.verifyOid = verifyOid;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getServerUrl() {
        return serverUrl;
    }

    public void setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
    }

    public String getAuthId() {
        return authId;
    }

    public void setAuthId(String authId) {
        this.authId = authId;
    }

    public String getAuthKey() {
        return authKey;
    }

    public void setAuthKey(String authKey) {
        this.authKey = authKey;
    }

    public Integer getThreadNum() {
        return threadNum;
    }

    public void setThreadNum(Integer threadNum) {
        this.threadNum = threadNum;
    }

    public Long getRecordNum() {
        return recordNum;
    }

    public void setRecordNum(Long recordNum) {
        this.recordNum = recordNum;
    }

    public Long getSendNum() {
        return sendNum;
    }

    public void setSendNum(Long sendNum) {
        this.sendNum = sendNum;
    }

    public Long getSuccessNum() {
        return successNum;
    }

    public void setSuccessNum(Long successNum) {
        this.successNum = successNum;
    }

    public Long getErrorNum() {
        return errorNum;
    }

    public void setErrorNum(Long errorNum) {
        this.errorNum = errorNum;
    }

    public Long getSurplusNum() {
        return surplusNum;
    }

    public void setSurplusNum(Long surplusNum) {
        this.surplusNum = surplusNum;
    }

    public Double getExeProgress() {
        return exeProgress;
    }

    public void setExeProgress(Double exeProgress) {
        this.exeProgress = exeProgress;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
